package com.tcm.service;

import com.tcm.entity.ExerciseHis;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.ExerciseHisDetail;
import com.tcm.entity.dto.ExerciseHisDetailUpdateDto;
import com.tcm.entity.dto.ExerciseHisUpdateDto;
import org.springframework.transaction.annotation.Transactional;

/**
* @author Guqier
* @description 针对表【ts_exercise_his(实训记录表)】的数据库操作Service
* @createDate 2023-09-13 20:07:29
*/
public interface ExerciseHisService extends IService<ExerciseHis> {

    ExerciseHisUpdateDto getExerciseHis(Long exerciseId, String account);

    ExerciseHisUpdateDto initExerciseUpdateDto(Long exerciseId, String account, Long testPaperId, Integer itemCount);

    @Transactional
    boolean saveExerciseHis(ExerciseHisUpdateDto dto, Long currUserId);

    @Transactional
    boolean saveExerciseHisDetail(ExerciseHisDetailUpdateDto dto, Long currUserId);

    @Transactional
    boolean saveExerciseHisDetail(ExerciseHisDetail detail);

    @Transactional
    boolean completeExerciseHis(Long exerciseId, String account);
}
